package com.fmdj.snm.service.impl;

import com.fmdj.snm.dao.MessageDao;
import com.fmdj.snm.dao.MessageRefDao;
import com.fmdj.snm.entry.MessageEntity;
import com.fmdj.snm.entry.MessageRefEntity;
import com.fmdj.snm.service.MessageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class MessageServiceImpl implements MessageService {

    @Autowired
    private MessageDao messageDao;

    @Autowired
    private MessageRefDao messageRefDao;
    @Override
    public String insertMessageRef(MessageRefEntity entity) {
        String id = messageRefDao.insert(entity);
        return id;
    }

    @Override
    public String insertMessage(MessageEntity entity) {
        String id = messageDao.insert(entity);
        return id;
    }
}
